Sample Code - FieldObject Object

This sample code shows the use of the FieldObject Object. Modify the following sample code to fit your needs.

Private Sub Command1_Click()
On Error GoTo Command1_Click_Error

Dim crystalApplication As CRPEAuto.Application
Dim crystalReport As CRPEAuto.Report
Dim crystalFieldObject as CRPEAuto.FieldObject

Set crystalApplication = CreateObject("Crystal.CRPE.Application")
Set crystalReport = crystalApplication.OpenReport _
    ("d:\crw\reports\craze\wwsales.rpt")

' field object stuff, but who is the parent

Command1_Click_Exit:
Exit Sub

Command1_Click_Error:

If crystalApplication Is Nothing Then
MsgBox "Unable to CreateObject(""Crystal.CRPE.Application"")"
GoTo Command1_Click_Exit
End If
If crystalReport Is Nothing Then
MsgBox "Unable to OpenReport(""d:\crw\reports\craze\wwsales.rpt"")"
GoTo Command1_Click_Exit
End If

MsgBox "Unknown error in Command1_Click routine"

GoTo Command1_Click_Exit

End Sub


Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com